//常用方法
import { Route } from '@/model/route'
/**
 * 生成路由数据，一维数组
 * @param routeData
 */
export const gerenateRoutePage = (routeData: Route[]) => {
  let routes: string[] = []
  routeData.map((ele: Route) => {
    if (ele.isPage) {
      routes.push(ele.path as string)
    } else if (ele.children && ele.children.length) {
      routes.push(...gerenateRoutePage(ele.children))
    }
  })
  return routes
}
